package com.ruoyi.directionSys.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.directionSys.mapper.TbResearchDirectionMapper;
import com.ruoyi.directionSys.domain.TbResearchDirection;
import com.ruoyi.directionSys.service.ITbResearchDirectionService;

/**
 * 研究方向Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-08
 */
@Service
public class TbResearchDirectionServiceImpl implements ITbResearchDirectionService 
{
    @Autowired
    private TbResearchDirectionMapper tbResearchDirectionMapper;

    /**
     * 查询研究方向
     * 
     * @param id 研究方向主键
     * @return 研究方向
     */
    @Override
    public TbResearchDirection selectTbResearchDirectionById(Long id)
    {
        return tbResearchDirectionMapper.selectTbResearchDirectionById(id);
    }

    /**
     * 查询研究方向列表
     * 
     * @param tbResearchDirection 研究方向
     * @return 研究方向
     */
    @Override
    public List<TbResearchDirection> selectTbResearchDirectionList(TbResearchDirection tbResearchDirection)
    {
        return tbResearchDirectionMapper.selectTbResearchDirectionList(tbResearchDirection);
    }

    /**
     * 新增研究方向
     * 
     * @param tbResearchDirection 研究方向
     * @return 结果
     */
    @Override
    public int insertTbResearchDirection(TbResearchDirection tbResearchDirection)
    {
        return tbResearchDirectionMapper.insertTbResearchDirection(tbResearchDirection);
    }

    /**
     * 修改研究方向
     * 
     * @param tbResearchDirection 研究方向
     * @return 结果
     */
    @Override
    public int updateTbResearchDirection(TbResearchDirection tbResearchDirection)
    {
        return tbResearchDirectionMapper.updateTbResearchDirection(tbResearchDirection);
    }

    /**
     * 批量删除研究方向
     * 
     * @param ids 需要删除的研究方向主键
     * @return 结果
     */
    @Override
    public int deleteTbResearchDirectionByIds(Long[] ids)
    {
        return tbResearchDirectionMapper.deleteTbResearchDirectionByIds(ids);
    }

    /**
     * 删除研究方向信息
     * 
     * @param id 研究方向主键
     * @return 结果
     */
    @Override
    public int deleteTbResearchDirectionById(Long id)
    {
        return tbResearchDirectionMapper.deleteTbResearchDirectionById(id);
    }
}
